{% extends 'myadmin/base.html' %}
{% block title %}
<title>Book-shop分类添加</title>
{% endblock %}
{% block con %}
<div class="panel-body">
    <div class="row" style="margin-top: 80px;">
        <form class="form-horizontal" role="form" action="{% url 'myadmin_types_insert' %}" method="post"
              enctype="multipart/form-data">
            {% csrf_token %}

            <section class="panel">
                <header class="panel-heading">
                    分类添加列表
                </header>
                <div class="panel-body">
                    <form class="form-horizontal " method="get">
                        <div class="form-group">
                            <label class="control-label col-lg-4">所属分类*</label>
                            <div class="col-lg-4">
                                <select name="pid" class="form-control m-bot15">
                                    <option value="0">顶级分类</option>
                                    {% for i in data %}
                                    <option value="{{i.id}}">{{i.sb}}{{i.name}}</option>
                                    {% endfor %}
                                </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-lg-4 control-label">分类名*</label>
                            <div class="col-lg-4">
                                <input type="text" name="name" required class="form-control"
                                       placeholder="请输入图书分类名称">
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-lg-offset-4 col-lg-5">
                                <button class="btn btn-primary">提&nbsp;&nbsp;&nbsp;&nbsp;交</button>
                            </div>
                        </div>
                    </form>
                </div>
            </section>

        </form>
    </div>
</div>

{% endblock %}